import request from './request'

//根据歌曲id查询歌曲信息
export const reqSongById = (params) => {
  return request({
    url: '/song/findById',
    method:'get',
    params
  })
} 

//根据歌曲列表歌曲联系表id查询信息
export const reqSongListById = (params) => {
  return request({
    url: '/songListItem/findById',
    method:'get',
    params
  })
} 

//根据歌曲和歌曲类型连接表id查询信息
export const reqSongTypeById = (params) => {
  return request({
    url: '/songTypeContact/findById',
    method:'get',
    params
  })
} 

//根据token获取用户信息
export const reqGetUserInfo = (params) => {
  return request({
    url: '/user/userInfo',
    method:'get',
    params
  })
} 

//获取推荐歌单
export const reqRecommendSheet = () => {
  return request({
    url: '/recommend/list',
    method:'get'
  })
}

//获取歌曲列表
export const reqSongList = () => {
  return request({
    url: '/song/list',
    method:'get'
  })
}

//获取歌曲列表
export const reqSongMenu = () => {
  return request({
    url: '/songList/list',
    method:'get'
  })
}

//登录接口
export const reqUserLogin = params => {
  return request({
    url: '/login',
    params,
    method: 'post'
  })
}

//注册接口
export const reqUserRegister = params => {
  return request({
    url: '/user/add',
    params,
    method: 'post'
  })
}

//热门管理
export const reqHotSong = () => {
  return request({
    url: '/click/list',
    method:'get'
  })
}

export const reqSongTypeList = () => {
  return request({
    url: '/songType/list',
    method:'get'
  })
}
//粉丝
export const reqFun = () => {
  return request({
    url: '/follow/list',
    method:'get'
  })
}

// 查询歌曲信息
export const reqSongId = params => {
  return request({
    url: `/song/findById?id=${params}`,
    method:'get'
  })
}

//查询歌曲专辑和歌曲信息
export const reqAlubum = params => {
  return request({
    url: `/songAlbumContact/findById?id=${params}`,
    method:'get'
  })
}

//推荐歌曲
export const reqRecommendSong = () => {
  return request({
    url: '/song/findRecommendSong',
    method:'get'
  })
}

//歌手信息获取
export const reqSingerList = () => {
  return request({
    url: '/singer/list',
    method:'get'
  })
}

//通过歌手id查找信息
export const reqSingerMessage = (params) => {
  return requests({
    url: `/song-singer/findById/?id=${params}`,
    method:'get'
  })
}

